Skip to content

feat(schema): Add Culture Context#5615

Merged
logaretm merged 3 commits intomasterfrom
awad/feat/add-culture-context-to-schema
Feb 6, 2026
Merged

feat(schema): Add Culture Context#5615
logaretm merged 3 commits intomasterfrom
awad/feat/add-culture-context-to-schema

Conversation

@logaretm
Copy link
Member

@logaretm logaretm commented Feb 4, 2026

Adds Culture context to the schema definitions

relevant to getsentry/sentry-javascript#18801 | PR (getsentry/sentry-javascript#19148)

@logaretm logaretm marked this pull request as ready for review February 4, 2026 16:52
@logaretm logaretm requested a review from a team as a code owner February 4, 2026 16:52
Copilot AI review requested due to automatic review settings February 4, 2026 16:52
Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR adds a new Culture context to the Relay event schema, which allows capturing cultural and locale-specific information from events. This addition supports the Sentry JavaScript SDK's need to track culture-related information (as referenced in the linked issue and PR).

Changes:

  • Added a new CultureContext struct with fields for calendar, display_name, locale, is_24_hour_format, and timezone
  • Integrated the Culture context into the Context enum and module system
  • Added comprehensive test coverage for the new context
  • Updated CHANGELOG to document the feature addition

Reviewed changes

Copilot reviewed 3 out of 3 changed files in this pull request and generated 3 comments.

File Description
relay-event-schema/src/protocol/contexts/culture.rs New file defining the CultureContext struct with fields for cultural/locale information, trait implementations, and roundtrip tests
relay-event-schema/src/protocol/contexts/mod.rs Added Culture module import/export and Culture variant to the Context enum
CHANGELOG.md Added entry documenting the Culture context feature

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.


/// The timezone of the locale.
///
/// For example, `Europe/Vienna`.
Copy link

Copilot AI Feb 4, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The timezone field should be marked with #[metastructure(pii = "maybe")] annotation. This field can potentially contain personally identifiable information similar to how the timezone field in DeviceContext is marked (see relay-event-schema/src/protocol/contexts/device.rs:118-120). Timezone information can reveal user location.

Suggested change
/// For example, `Europe/Vienna`.
/// For example, `Europe/Vienna`.
#[metastructure(pii = "maybe")]

Copilot uses AI. Check for mistakes.

/// Human-readable name of the culture.
///
/// For example, `English (United States)`.
Copy link

Copilot AI Feb 4, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The display_name field should be marked with #[metastructure(pii = "maybe")] annotation. This field contains human-readable locale information (e.g., "English (United States)") which can reveal user location and preferences, similar to other locale-related fields that are marked as potentially containing PII.

Suggested change
/// For example, `English (United States)`.
/// For example, `English (United States)`.
#[metastructure(pii = "maybe")]

Copilot uses AI. Check for mistakes.
Copy link

@cursor cursor bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Cursor Bugbot has reviewed your changes and found 1 potential issue.

Bugbot Autofix is OFF. To automatically fix reported issues with Cloud Agents, enable Autofix in the Cursor dashboard.

@logaretm logaretm added this pull request to the merge queue Feb 6, 2026
Merged via the queue into master with commit 6a7b33a Feb 6, 2026
61 of 64 checks passed
@logaretm logaretm deleted the awad/feat/add-culture-context-to-schema branch February 6, 2026 15:19
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants